import cv2
image =cv2.imread('animal.png',cv2.IMREAD_GRAYSCALE)
sobelx=cv2.soble(image,cv2.CV_64F,1,0)
sobelY=cv2.soble(image,cv2.CV_64F,0,1)
graf_x=cv2.convertScaleAbs(sobelx)

graf_y=cv2.convertScaleAbs(sobely)
sobelxy=cv2.addWeighted(graf_x,0.5,graf_y,0.5,0)

scrcharrx=cv2.scharr(image,cv2.CV_64F,1,0)
scrcharry=cv2.scharr(image,cv2.CV_64F,1,0)
scrcharrxy=cv2.addWeighted(graf_x,0.5,graf_y,0.5,0)
cv2.imshow(sobelxy)
cv2.imshow(scrcharrxy)
cv2.waitKey()
cv2.destroyWindow()